/*  1:   */ package com.rinsi.app.azsb.azzl.azsqs.gkjsq.one;
/*  2:   */ 
/*  3:   */ import com.rinsi.core.CoreCache;
/*  4:   */ import com.rinsi.core.service.CoreSimpleService;
/*  5:   */ import com.rinsi.util.ListUtil;
/*  6:   */ import com.rinsi.util.MapUtil;
/*  7:   */ import java.util.List;
/*  8:   */ import java.util.Map;
/*  9:   */ import org.mybatis.spring.SqlSessionTemplate;
/* 10:   */ import org.springframework.stereotype.Service;
/* 11:   */ 
/* 12:   */ @Service
/* 13:   */ public class GkjsqOneService
/* 14:   */   extends CoreSimpleService
/* 15:   */ {
/* 16:   */   public void afterIndex(Map<String, Object> model, Map<String, Object> rMap)
/* 17:   */   {
/* 18:20 */     Map<String, Object> params = getParams(model);
/* 19:   */     
/* 20:22 */     Map<String, Object> config = getConfig(model);
/* 21:   */     
/* 22:24 */     rMap.putAll(getParams(model));
/* 23:   */     
/* 24:26 */     List<Map<String, Object>> modules = CoreCache.getCacheList(MapUtil.getString(params, "UID"), "modules");
/* 25:   */     
/* 26:28 */     List<Map<String, Object>> sub_rights = ListUtil.subList(modules, "MODULE_NO_PRE='500002'");
/* 27:   */     
/* 28:30 */     rMap.put("azsbxx", getSqlSessionTemplate().selectOne("azsb.get", params));
/* 29:   */     
/* 30:32 */     rMap.put("userxx", CoreCache.getCacheMap(MapUtil.getString(params, "UID"), "user"));
/* 31:   */     
/* 32:34 */     model.put("sub_rights", ListUtil.listToMap(sub_rights, "MODULE_TYPE"));
/* 33:   */     try
/* 34:   */     {
/* 35:38 */       List<Map<String, Object>> datas = getSqlSessionTemplate().selectList(namespace(config) + ".list", params);
/* 36:40 */       if (datas.size() == 0)
/* 37:   */       {
/* 38:42 */         getSqlSessionTemplate().selectList(namespace(config) + ".init", params);
/* 39:   */         
/* 40:44 */         datas = getSqlSessionTemplate().selectList(namespace(config) + ".list", params);
/* 41:   */       }
/* 42:48 */       rMap.put("datas", datas);
/* 43:   */       
/* 44:50 */       rMap.put("success", Boolean.valueOf(true));
/* 45:   */     }
/* 46:   */     catch (Exception e)
/* 47:   */     {
/* 48:54 */       rMap.put("success", Boolean.valueOf(false));
/* 49:56 */       if (MapUtil.getBoolean(rMap, "shoeExMessage").booleanValue()) {
/* 50:58 */         rMap.put("message", e.getMessage());
/* 51:   */       } else {
/* 52:62 */         rMap.put("message", "展示数据列表出错！请稍后重试，或联系系统管理员！");
/* 53:   */       }
/* 54:65 */       rMap.put("ex", e.getMessage());
/* 55:   */       
/* 56:67 */       e.printStackTrace();
/* 57:   */     }
/* 58:   */   }
/* 59:   */ }


/* Location:           D:\Users\Desktop\shanxi\项目\sxazmis\WEB-INF\classes\
 * Qualified Name:     com.rinsi.app.azsb.azzl.azsqs.gkjsq.one.GkjsqOneService
 * JD-Core Version:    0.7.0.1
 */